---
  import BaseHead from '../components/Head/BaseHead.astro';
  import Nav from '../components/Nav.astro';
  import HomeHeader from '../components/HomeHeader.astro';
  import Card from '../components/Card.astro';
  import Footer from '../components/Footer/Footer.astro'

  import BlogPostLayout from "../layouts/BlogPostLayout.astro";
  import BlogPost from "../components/BlogPost.astro";
  import { onMount } from "svelte";
  import { useStoryblokApi } from "@storyblok/astro";

  let postId = Astro.url.searchParams.get('post');

  console.log(postId);
  const url = `http://localhost:9901/api/getArticleById?id=${postId}`
  const response = await fetch(url);
  //console.log("发送请求");
  const data = await response.json();
  //console.log(data);
---

  <BlogPostLayout all = {data}>

  </BlogPostLayout>

